# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
pkgname=csfml
pkgver=2.5.2
pkgrel=1
pkgdesc='C bindings for sfml'
arch=('loong64' 'x86_64')
url='http://www.sfml-dev.org/'
license=('custom:zlib')
depends=("sfml")
makedepends=('cmake' 'doxygen' 'ninja')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/SFML/CSFML/archive/${pkgver}.tar.gz")
sha512sums=('d651b42e777647d748edf8d2cc40e6df9b0e3fe0f9af5f5c84e9d62ac5bdf6e7e0ff4bb037ee81b59e0bdec544ad05e3b503a4555f03bfa6292a80c6188c12dc')

build() {
  cd CSFML-*

  cmake \
      -Bbuild \
      -GNinja \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DCSFML_BUILD_DOC=true
  ninja -C build
  ninja -C build doc
}

package() {
  cd CSFML-*

  DESTDIR="$pkgdir/" ninja -C build install

  install -Dm644 license.md ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}

